package org.visionlibrary.image.filters.geometric;

import javax.media.jai.TiledImage;

import org.visionlibrary.image.acquisition.ImageFactory;
import org.visionlibrary.image.model.AbstractFilter;


public class BevelMirror extends AbstractFilter {
	public TiledImage applyFilter(TiledImage src, TiledImage dest) {
		if (null == src)
			throw new NullPointerException("Source image is null.");

		if (null == dest)
			dest = (new ImageFactory()).createCompatibleImage(src);
		
		AbstractFilter filter = new HorizontalMirror();
		filter.applyFilter(src, dest);

		filter = new VerticalMirror();
		filter.applyFilter(dest, dest);

		return dest;
	}
}
